import Http from "../utils/http"
import APIConfig from "../config/api"
import cache from "../enum/cache";


class Token {
    static async getToken(){
        const res = await Http.request({
            url: '/v1/token',
            method: 'POST',
            data: {
                i_code: APIConfig.iCode,
                order_no: APIConfig.orderNo
            }
        })

        return res.token
    }


    static async verifyToken() {
        const token = wx.setStorageSync(cache.TOKEN);

        return Http.request({
            url: '/v1/token/varify',
            method: 'POST',
            
        })
    }
}

export default Token